Skip to contentSkip to conversation

Change in openvpn[master]: Log SSL alerts more prominently

Openvpn-devel In review plaisthos (Code Review) 3 participants 8 messages Nov 20, 2023 – Nov 21, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1700479678000.I6bdab3028c9bd679c31d4177a746a3ea505dcbbf@...2715...

#1 lore raw

Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/448?usp=email

to review the following change.

Change subject: Log SSL alerts more prominently
......................................................................

Log SSL alerts more prominently

When we receive an SSL alert from a server we currently only log a very cryptic OpenSSL error message:

OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL alert number 70

This also enables logging the much more readable SSL error message:

Received fatal SSL alert: protocol version

which previously needed --verb 8 to be displayed (now verb 3). Also rework the message to be better readable.

Change-Id I6bdab3028c9bd679c31d4177a746a3ea505dcbbf

---
M src/openvpn/ssl_openssl.c

1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/448/1

src/openvpn/ssl_openssl.c +2 -2
index 23e7623..82872bf 100644
@@ -196,8 +196,8 @@
     }
     else if (where & SSL_CB_ALERT)
     {
-        dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s",
-             where & SSL_CB_READ ? "read" : "write",
+        dmsg(D_TLS_DEBUG_LOW, "%s %s SSL alert: %s",
+             where & SSL_CB_READ ? "Received" : "Sent",
              SSL_alert_type_string_long(ret),
              SSL_alert_desc_string_long(ret));
     }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf
Gerrit-Change-Number: 448
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/448?usp=email )

Change subject: Log SSL alerts more prominently
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf
Gerrit-Change-Number: 448
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Comment-Date: Mon, 20 Nov 2023 11:43:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

Hello flichtenheld,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/448?usp=email

to look at the new patch set (#2).

The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied now.

Change subject: Log SSL alerts more prominently
......................................................................

Log SSL alerts more prominently

When we receive an SSL alert from a server we currently only log a very cryptic OpenSSL error message:

OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL alert number 70

This also enables logging the much more readable SSL error message:

Received fatal SSL alert: protocol version

which previously needed --verb 8 to be displayed (now verb 3). Also rework the message to be better readable.

Change-Id I6bdab3028c9bd679c31d4177a746a3ea505dcbbf

---
M src/openvpn/ssl_openssl.c

1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/448/2

src/openvpn/ssl_openssl.c +2 -2
index 23e7623..82872bf 100644
@@ -196,8 +196,8 @@
     }
     else if (where & SSL_CB_ALERT)
     {
-        dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s",
-             where & SSL_CB_READ ? "read" : "write",
+        dmsg(D_TLS_DEBUG_LOW, "%s %s SSL alert: %s",
+             where & SSL_CB_READ ? "Received" : "Sent",
              SSL_alert_type_string_long(ret),
              SSL_alert_desc_string_long(ret));
     }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf
Gerrit-Change-Number: 448
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newpatchset

#4 lore raw
In reply to a message not in the archive

Attention is currently required from: plaisthos.

Hello flichtenheld,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/448?usp=email

to look at the new patch set (#3).

The change is no longer submittable: checks~ChecksSubmitRule is unsatisfied now.

Change subject: Log SSL alerts more prominently
......................................................................

Log SSL alerts more prominently

When we receive an SSL alert from a server we currently only log a very cryptic OpenSSL error message:

OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL alert number 70

This also enables logging the much more readable SSL error message:

Received fatal SSL alert: protocol version

which previously needed --verb 8 to be displayed (now verb 3). Also rework the message to be better readable.

Change-Id I6bdab3028c9bd679c31d4177a746a3ea505dcbbf

---
M src/openvpn/ssl_openssl.c

1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/448/3

src/openvpn/ssl_openssl.c +2 -2
index 23e7623..82872bf 100644
@@ -196,8 +196,8 @@
     }
     else if (where & SSL_CB_ALERT)
     {
-        dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s",
-             where & SSL_CB_READ ? "read" : "write",
+        dmsg(D_TLS_DEBUG_LOW, "%s %s SSL alert: %s",
+             where & SSL_CB_READ ? "Received" : "Sent",
              SSL_alert_type_string_long(ret),
              SSL_alert_desc_string_long(ret));
     }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf
Gerrit-Change-Number: 448
Gerrit-PatchSet: 3
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newpatchset

#5 lore raw

PATCH v3 1/1 Log SSL alerts more prominently

In reply to a message not in the archive

From: Arne Schwabe <[email protected]...>

When we receive an SSL alert from a server we currently only log a very cryptic OpenSSL error message:

OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL alert number 70

This also enables logging the much more readable SSL error message:

Received fatal SSL alert: protocol version

which previously needed --verb 8 to be displayed (now verb 3). Also rework the message to be better readable.

Change-Id I6bdab3028c9bd679c31d4177a746a3ea505dcbbf

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/448
This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>

src/openvpn/ssl_openssl.c +2 -2
index 23e7623..82872bf 100644
@@ -196,8 +196,8 @@
     }
     else if (where & SSL_CB_ALERT)
     {
-        dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s",
-             where & SSL_CB_READ ? "read" : "write",
+        dmsg(D_TLS_DEBUG_LOW, "%s %s SSL alert: %s",
+             where & SSL_CB_READ ? "Received" : "Sent",
              SSL_alert_type_string_long(ret),
              SSL_alert_desc_string_long(ret));
     }
#6 lore raw

[Openvpn-devel] [PATCH applied] Re: Log SSL alerts more prominently

Better diagnostics is goood!

Your patch has been applied to the master and release/2.6 branch (very basic change, no code flow change, enhanced diagnostics good).

We might consider moving from dmsg() to msg() - this is neither very time consuming nor increasing binary size hugely.

commit a1cb1b47b138b9f654cd0bca5de6d08dbca61888 (master) commit 94cd53c70e8e8fdd0beac79b17bdb1f912e03cb7 (release/2.6)

Author: Arne Schwabe
Date:   Tue Nov 21 11:39:30 2023 +0100
     Log SSL alerts more prominently

     Signed-off-by: Arne Schwabe <[email protected]...>
     Acked-by: Frank Lichtenheld <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg27523.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#7 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#4) to the change originally created by plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/448?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld

Change subject: Log SSL alerts more prominently
......................................................................

Log SSL alerts more prominently

When we receive an SSL alert from a server we currently only log a very cryptic OpenSSL error message:

OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL alert number 70

This also enables logging the much more readable SSL error message:

Received fatal SSL alert: protocol version

which previously needed --verb 8 to be displayed (now verb 3). Also rework the message to be better readable.

Change-Id I6bdab3028c9bd679c31d4177a746a3ea505dcbbf

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27523.html

---
M src/openvpn/ssl_openssl.c

1 file changed, 2 insertions(+), 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/48/448/4

src/openvpn/ssl_openssl.c +2 -2
index 23e7623..82872bf 100644
@@ -196,8 +196,8 @@
     }
     else if (where & SSL_CB_ALERT)
     {
-        dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s",
-             where & SSL_CB_READ ? "read" : "write",
+        dmsg(D_TLS_DEBUG_LOW, "%s %s SSL alert: %s",
+             where & SSL_CB_READ ? "Received" : "Sent",
              SSL_alert_type_string_long(ret),
              SSL_alert_desc_string_long(ret));
     }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf
Gerrit-Change-Number: 448
Gerrit-PatchSet: 4
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#8 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/448?usp=email )

Change subject: Log SSL alerts more prominently
......................................................................

Log SSL alerts more prominently

When we receive an SSL alert from a server we currently only log a very cryptic OpenSSL error message:

OpenSSL: error:0A00042E:SSL routines::tlsv1 alert protocol version:SSL alert number 70

This also enables logging the much more readable SSL error message:

Received fatal SSL alert: protocol version

which previously needed --verb 8 to be displayed (now verb 3). Also rework the message to be better readable.

Change-Id I6bdab3028c9bd679c31d4177a746a3ea505dcbbf

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27523.html

---
M src/openvpn/ssl_openssl.c

1 file changed, 2 insertions(+), 2 deletions(-)
src/openvpn/ssl_openssl.c +2 -2
index 23e7623..82872bf 100644
@@ -196,8 +196,8 @@
     }
     else if (where & SSL_CB_ALERT)
     {
-        dmsg(D_HANDSHAKE_VERBOSE, "SSL alert (%s): %s: %s",
-             where & SSL_CB_READ ? "read" : "write",
+        dmsg(D_TLS_DEBUG_LOW, "%s %s SSL alert: %s",
+             where & SSL_CB_READ ? "Received" : "Sent",
              SSL_alert_type_string_long(ret),
              SSL_alert_desc_string_long(ret));
     }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/448?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6bdab3028c9bd679c31d4177a746a3ea505dcbbf
Gerrit-Change-Number: 448
Gerrit-PatchSet: 4
Gerrit-Owner: plaisthos <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged